package com.lkj.t12;

public class Run {

    public static void main(String[] args) throws InterruptedException {

//        try {
//            MyThread thread = new MyThread();
//            thread.start();
//            Thread.sleep(1000);
//            thread.interrupt();
//            //Thread.currentThread().interrupt();
//            System.out.println("is stop 1="+Thread.interrupted());
//            System.out.println("is stop 2="+Thread.interrupted());
//        } catch (InterruptedException e) {
//            System.out.println("main catch");
//            e.printStackTrace();
//        }
//        System.out.println("end!");

        Thread.currentThread().interrupt();
        System.out.println("is stop 1="+Thread.interrupted());
        System.out.println("is stop 2="+Thread.interrupted());
        System.out.println("end!");
    }
}
